luci-proto-wireguard: use ddns lookup_host for peer hints
authorJo-Philipp Wich <[email protected]>
Tue, 14 Mar 2023 22:34:53 +0000 (23:34 +0100)
committerJo-Philipp Wich <[email protected]>
Mon, 3 Apr 2023 11:16:37 +0000 (13:16 +0200)
The `domain` option of a DDNS service entry may contain non-hostname values,
use the `lookup_hostname` option instead.

Fixes: #6289
Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 59a6f062d29ee7a400e9cb0477e0e55eb674208a)

protocols/luci-proto-wireguard/htdocs/luci-static/resources/protocol/wireguard.js

index 068cc7b0c1763f5897853854442f328a9559cc99..71b822adbf4e9ea3e56fdd33bf58a09ea8736b41 100644 (file)
@@ -732,8 +732,8 @@ return network.registerProtocol('wireguard', {
                                var hostnames = [];
 
                                uci.sections('ddns', 'service', function(s) {
-                                       if (typeof(s.domain) == 'string' && s.enabled == '1')
-                                               hostnames.push(s.domain);
+                                       if (typeof(s.lookup_host) == 'string' && s.enabled == '1')
+                                               hostnames.push(s.lookup_host);
                                });
 
                                uci.sections('system', 'system', function(s) {